package huaweiExam;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Test2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str1 = sc.nextLine();
        String[] arr1 = str1.split(" ");
        List<Integer> nums1 = Arrays.asList(arr1).stream().map(Integer::parseInt).collect(Collectors.toList());
        String str2 = sc.nextLine();
        String[] arr2 = str2.split(" ");
        List<Integer> nums2 = Arrays.asList(arr2).stream().map(Integer::parseInt).collect(Collectors.toList());
        int k = Integer.parseInt(sc.nextLine());
        System.out.println(getRes(nums1, nums2, k));
    }

    public static int getRes(List<Integer> arr1, List<Integer> arr2, int limit) {
        int len1 = arr1.size();
        int len2 = arr2.size();
        List<Integer> sums = new ArrayList<>();
        int res = 0;
        for (int i = 1; i < len1; i++) {
            int count = limit;
            for (int j = 1; j < len2; j++) {
                if (count > 0) {
                    sums.add(arr1.get(i) + arr2.get(j));
                    count--;
                }
            }
        }
        sums.sort((num1, num2) -> num1 - num2);
        for (int i = 0; i < sums.size() && i < limit; i++) {
            res += sums.get(i);
        }
        return res;
    }
}
